Machines and facilities used on many production sites are controlled by control systems. A typical control system includes a programmable logic controller (also abbreviated below as a “PLC”) or other control device (controller) as a main constituent element.
A PLC includes a plurality of units. For example, the plurality of units include: a central processing unit (CPU) unit includes a microprocessor that executes a user program; and an input and output (I/O) unit takes charge of receiving a signal from an external switch or sensor and outputting a signal to an external relay or actuator. The PLC performs a control operation while swapping data between the units via a PLC system bus and/or a field network in execution cycles of the user program.
The CPU unit in the PLC executes the user program, a system program, and other programs in accordance with the assignment of tasks. Examples of processes performed as tasks by the PLC include: I/O refresh in which the CPU unit performs data input/output for a slave apparatus or the I/O unit; the execution of the user program; motion control that receives an instruction from the user program and executes it; a data trace process; and other processes.
Tasks include a fixed cycle task and an event task; the fixed cycle task is repeatedly and periodically performed by the PLC, and the event task is performed by the PLC only once when a preset condition is satisfied. Each task has an execution priority and a task cycle assigned thereto. The CPU unit executes individual programs in accordance with the priorities of tasks.
An exemplary PLC that operates in accordance with the assignments of tasks is in Japanese Patent No. 4894961 (Patent Document 1), for example. Patent Document 1 describers a CPU unit in the PLC which, in view of an incident in which an execution time of a control program may be prolonged randomly and intermittently. More specifically, the CPU unit sets a communication period required to input or output control data to a preset time, which is shorter than the maximum execution time of a control program. According to the description of Patent Document 1, if a program having a high priority for task execution and a program having a low priority are present, the CPU unit executes the high-priority program within a preset cycle time and, after having completed this execution, executes the low-priority program.